3.3.17 \(\int \frac {\tan ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx\) [217]

Optimal. Leaf size=85 \[ -\frac {x}{a-b}+\frac {a^{5/2} \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{(a-b) b^{5/2} f}-\frac {(a+b) \tan (e+f x)}{b^2 f}+\frac {\tan ^3(e+f x)}{3 b f} \]

[Out]

-x/(a-b)+a^(5/2)*arctan(b^(1/2)*tan(f*x+e)/a^(1/2))/(a-b)/b^(5/2)/f-(a+b)*tan(f*x+e)/b^2/f+1/3*tan(f*x+e)^3/b/
f

________________________________________________________________________________________

Rubi [A]
time = 0.13, antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3751, 490, 596, 536, 209, 211} \begin {gather*} \frac {a^{5/2} \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{b^{5/2} f (a-b)}-\frac {(a+b) \tan (e+f x)}{b^2 f}-\frac {x}{a-b}+\frac {\tan ^3(e+f x)}{3 b f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Tan[e + f*x]^6/(a + b*Tan[e + f*x]^2),x]

[Out]

-(x/(a - b)) + (a^(5/2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]])/((a - b)*b^(5/2)*f) - ((a + b)*Tan[e + f*x])/(
b^2*f) + Tan[e + f*x]^3/(3*b*f)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 490

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[e^(2*n -
 1)*(e*x)^(m - 2*n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(b*d*(m + n*(p + q) + 1))), x] - Dist[e^(2*n)
/(b*d*(m + n*(p + q) + 1)), Int[(e*x)^(m - 2*n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*c*(m - 2*n + 1) + (a*d*(m +
 n*(q - 1) + 1) + b*c*(m + n*(p - 1) + 1))*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, p, q}, x] && NeQ[b*c - a*d
, 0] && IGtQ[n, 0] && GtQ[m - n + 1, n] && IntBinomialQ[a, b, c, d, e, m, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 596

Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)),
 x_Symbol] :> Simp[f*g^(n - 1)*(g*x)^(m - n + 1)*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(b*d*(m + n*(p + q +
 1) + 1))), x] - Dist[g^n/(b*d*(m + n*(p + q + 1) + 1)), Int[(g*x)^(m - n)*(a + b*x^n)^p*(c + d*x^n)^q*Simp[a*
f*c*(m - n + 1) + (a*f*d*(m + n*q + 1) + b*(f*c*(m + n*p + 1) - e*d*(m + n*(p + q + 1) + 1)))*x^n, x], x], x]
/; FreeQ[{a, b, c, d, e, f, g, p, q}, x] && IGtQ[n, 0] && GtQ[m, n - 1]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps

\begin {align*} \int \frac {\tan ^6(e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac {\text {Subst}\left (\int \frac {x^6}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\tan ^3(e+f x)}{3 b f}-\frac {\text {Subst}\left (\int \frac {x^2 \left (3 a+3 (a+b) x^2\right )}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{3 b f}\\ &=-\frac {(a+b) \tan (e+f x)}{b^2 f}+\frac {\tan ^3(e+f x)}{3 b f}+\frac {\text {Subst}\left (\int \frac {3 a (a+b)+3 \left (a^2+a b+b^2\right ) x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (e+f x)\right )}{3 b^2 f}\\ &=-\frac {(a+b) \tan (e+f x)}{b^2 f}+\frac {\tan ^3(e+f x)}{3 b f}-\frac {\text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{(a-b) f}+\frac {a^3 \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (e+f x)\right )}{(a-b) b^2 f}\\ &=-\frac {x}{a-b}+\frac {a^{5/2} \tan ^{-1}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )}{(a-b) b^{5/2} f}-\frac {(a+b) \tan (e+f x)}{b^2 f}+\frac {\tan ^3(e+f x)}{3 b f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.57, size = 92, normalized size = 1.08 \begin {gather*} \frac {-3 a^{5/2} \text {ArcTan}\left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a}}\right )+\sqrt {b} \left (3 b^2 (e+f x)+(a-b) \left (3 a+4 b-b \sec ^2(e+f x)\right ) \tan (e+f x)\right )}{3 b^{5/2} (-a+b) f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Tan[e + f*x]^6/(a + b*Tan[e + f*x]^2),x]

[Out]

(-3*a^(5/2)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a]] + Sqrt[b]*(3*b^2*(e + f*x) + (a - b)*(3*a + 4*b - b*Sec[e +
 f*x]^2)*Tan[e + f*x]))/(3*b^(5/2)*(-a + b)*f)

________________________________________________________________________________________

Maple [A]
time = 0.19, size = 88, normalized size = 1.04

method result size
derivativedivides \(\frac {-\frac {-\frac {b \left (\tan ^{3}\left (f x +e \right )\right )}{3}+a \tan \left (f x +e \right )+b \tan \left (f x +e \right )}{b^{2}}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a -b}+\frac {a^{3} \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{b^{2} \left (a -b \right ) \sqrt {a b}}}{f}\) \(88\)
default \(\frac {-\frac {-\frac {b \left (\tan ^{3}\left (f x +e \right )\right )}{3}+a \tan \left (f x +e \right )+b \tan \left (f x +e \right )}{b^{2}}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a -b}+\frac {a^{3} \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {a b}}\right )}{b^{2} \left (a -b \right ) \sqrt {a b}}}{f}\) \(88\)
risch \(-\frac {x}{a -b}-\frac {2 i \left (3 a \,{\mathrm e}^{4 i \left (f x +e \right )}+6 b \,{\mathrm e}^{4 i \left (f x +e \right )}+6 a \,{\mathrm e}^{2 i \left (f x +e \right )}+6 b \,{\mathrm e}^{2 i \left (f x +e \right )}+3 a +4 b \right )}{3 f \,b^{2} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3}}-\frac {\sqrt {-a b}\, a^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{2 b^{3} \left (a -b \right ) f}+\frac {\sqrt {-a b}\, a^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{2 b^{3} \left (a -b \right ) f}\) \(204\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(f*x+e)^6/(a+b*tan(f*x+e)^2),x,method=_RETURNVERBOSE)

[Out]

1/f*(-1/b^2*(-1/3*b*tan(f*x+e)^3+a*tan(f*x+e)+b*tan(f*x+e))-1/(a-b)*arctan(tan(f*x+e))+1/b^2*a^3/(a-b)/(a*b)^(
1/2)*arctan(b*tan(f*x+e)/(a*b)^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 87, normalized size = 1.02 \begin {gather*} \frac {\frac {3 \, a^{3} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )}{{\left (a b^{2} - b^{3}\right )} \sqrt {a b}} - \frac {3 \, {\left (f x + e\right )}}{a - b} + \frac {b \tan \left (f x + e\right )^{3} - 3 \, {\left (a + b\right )} \tan \left (f x + e\right )}{b^{2}}}{3 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^6/(a+b*tan(f*x+e)^2),x, algorithm="maxima")

[Out]

1/3*(3*a^3*arctan(b*tan(f*x + e)/sqrt(a*b))/((a*b^2 - b^3)*sqrt(a*b)) - 3*(f*x + e)/(a - b) + (b*tan(f*x + e)^
3 - 3*(a + b)*tan(f*x + e))/b^2)/f

________________________________________________________________________________________

Fricas [A]
time = 4.95, size = 290, normalized size = 3.41 \begin {gather*} \left [-\frac {12 \, b^{2} f x - 4 \, {\left (a b - b^{2}\right )} \tan \left (f x + e\right )^{3} + 3 \, a^{2} \sqrt {-\frac {a}{b}} \log \left (\frac {b^{2} \tan \left (f x + e\right )^{4} - 6 \, a b \tan \left (f x + e\right )^{2} + a^{2} - 4 \, {\left (b^{2} \tan \left (f x + e\right )^{3} - a b \tan \left (f x + e\right )\right )} \sqrt {-\frac {a}{b}}}{b^{2} \tan \left (f x + e\right )^{4} + 2 \, a b \tan \left (f x + e\right )^{2} + a^{2}}\right ) + 12 \, {\left (a^{2} - b^{2}\right )} \tan \left (f x + e\right )}{12 \, {\left (a b^{2} - b^{3}\right )} f}, -\frac {6 \, b^{2} f x - 2 \, {\left (a b - b^{2}\right )} \tan \left (f x + e\right )^{3} - 3 \, a^{2} \sqrt {\frac {a}{b}} \arctan \left (\frac {{\left (b \tan \left (f x + e\right )^{2} - a\right )} \sqrt {\frac {a}{b}}}{2 \, a \tan \left (f x + e\right )}\right ) + 6 \, {\left (a^{2} - b^{2}\right )} \tan \left (f x + e\right )}{6 \, {\left (a b^{2} - b^{3}\right )} f}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^6/(a+b*tan(f*x+e)^2),x, algorithm="fricas")

[Out]

[-1/12*(12*b^2*f*x - 4*(a*b - b^2)*tan(f*x + e)^3 + 3*a^2*sqrt(-a/b)*log((b^2*tan(f*x + e)^4 - 6*a*b*tan(f*x +
 e)^2 + a^2 - 4*(b^2*tan(f*x + e)^3 - a*b*tan(f*x + e))*sqrt(-a/b))/(b^2*tan(f*x + e)^4 + 2*a*b*tan(f*x + e)^2
 + a^2)) + 12*(a^2 - b^2)*tan(f*x + e))/((a*b^2 - b^3)*f), -1/6*(6*b^2*f*x - 2*(a*b - b^2)*tan(f*x + e)^3 - 3*
a^2*sqrt(a/b)*arctan(1/2*(b*tan(f*x + e)^2 - a)*sqrt(a/b)/(a*tan(f*x + e))) + 6*(a^2 - b^2)*tan(f*x + e))/((a*
b^2 - b^3)*f)]

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 595 vs. \(2 (66) = 132\).
time = 19.89, size = 595, normalized size = 7.00 \begin {gather*} \begin {cases} \tilde {\infty } x \tan ^{4}{\left (e \right )} & \text {for}\: a = 0 \wedge b = 0 \wedge f = 0 \\\frac {- x + \frac {\tan ^{5}{\left (e + f x \right )}}{5 f} - \frac {\tan ^{3}{\left (e + f x \right )}}{3 f} + \frac {\tan {\left (e + f x \right )}}{f}}{a} & \text {for}\: b = 0 \\\frac {x + \frac {\tan ^{3}{\left (e + f x \right )}}{3 f} - \frac {\tan {\left (e + f x \right )}}{f}}{b} & \text {for}\: a = 0 \\\frac {15 f x \tan ^{2}{\left (e + f x \right )}}{6 b f \tan ^{2}{\left (e + f x \right )} + 6 b f} + \frac {15 f x}{6 b f \tan ^{2}{\left (e + f x \right )} + 6 b f} + \frac {2 \tan ^{5}{\left (e + f x \right )}}{6 b f \tan ^{2}{\left (e + f x \right )} + 6 b f} - \frac {10 \tan ^{3}{\left (e + f x \right )}}{6 b f \tan ^{2}{\left (e + f x \right )} + 6 b f} - \frac {15 \tan {\left (e + f x \right )}}{6 b f \tan ^{2}{\left (e + f x \right )} + 6 b f} & \text {for}\: a = b \\\frac {x \tan ^{6}{\left (e \right )}}{a + b \tan ^{2}{\left (e \right )}} & \text {for}\: f = 0 \\\frac {3 a^{3} \log {\left (- \sqrt {- \frac {a}{b}} + \tan {\left (e + f x \right )} \right )}}{6 a b^{3} f \sqrt {- \frac {a}{b}} - 6 b^{4} f \sqrt {- \frac {a}{b}}} - \frac {3 a^{3} \log {\left (\sqrt {- \frac {a}{b}} + \tan {\left (e + f x \right )} \right )}}{6 a b^{3} f \sqrt {- \frac {a}{b}} - 6 b^{4} f \sqrt {- \frac {a}{b}}} - \frac {6 a^{2} b \sqrt {- \frac {a}{b}} \tan {\left (e + f x \right )}}{6 a b^{3} f \sqrt {- \frac {a}{b}} - 6 b^{4} f \sqrt {- \frac {a}{b}}} + \frac {2 a b^{2} \sqrt {- \frac {a}{b}} \tan ^{3}{\left (e + f x \right )}}{6 a b^{3} f \sqrt {- \frac {a}{b}} - 6 b^{4} f \sqrt {- \frac {a}{b}}} - \frac {6 b^{3} f x \sqrt {- \frac {a}{b}}}{6 a b^{3} f \sqrt {- \frac {a}{b}} - 6 b^{4} f \sqrt {- \frac {a}{b}}} - \frac {2 b^{3} \sqrt {- \frac {a}{b}} \tan ^{3}{\left (e + f x \right )}}{6 a b^{3} f \sqrt {- \frac {a}{b}} - 6 b^{4} f \sqrt {- \frac {a}{b}}} + \frac {6 b^{3} \sqrt {- \frac {a}{b}} \tan {\left (e + f x \right )}}{6 a b^{3} f \sqrt {- \frac {a}{b}} - 6 b^{4} f \sqrt {- \frac {a}{b}}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)**6/(a+b*tan(f*x+e)**2),x)

[Out]

Piecewise((zoo*x*tan(e)**4, Eq(a, 0) & Eq(b, 0) & Eq(f, 0)), ((-x + tan(e + f*x)**5/(5*f) - tan(e + f*x)**3/(3
*f) + tan(e + f*x)/f)/a, Eq(b, 0)), ((x + tan(e + f*x)**3/(3*f) - tan(e + f*x)/f)/b, Eq(a, 0)), (15*f*x*tan(e
+ f*x)**2/(6*b*f*tan(e + f*x)**2 + 6*b*f) + 15*f*x/(6*b*f*tan(e + f*x)**2 + 6*b*f) + 2*tan(e + f*x)**5/(6*b*f*
tan(e + f*x)**2 + 6*b*f) - 10*tan(e + f*x)**3/(6*b*f*tan(e + f*x)**2 + 6*b*f) - 15*tan(e + f*x)/(6*b*f*tan(e +
 f*x)**2 + 6*b*f), Eq(a, b)), (x*tan(e)**6/(a + b*tan(e)**2), Eq(f, 0)), (3*a**3*log(-sqrt(-a/b) + tan(e + f*x
))/(6*a*b**3*f*sqrt(-a/b) - 6*b**4*f*sqrt(-a/b)) - 3*a**3*log(sqrt(-a/b) + tan(e + f*x))/(6*a*b**3*f*sqrt(-a/b
) - 6*b**4*f*sqrt(-a/b)) - 6*a**2*b*sqrt(-a/b)*tan(e + f*x)/(6*a*b**3*f*sqrt(-a/b) - 6*b**4*f*sqrt(-a/b)) + 2*
a*b**2*sqrt(-a/b)*tan(e + f*x)**3/(6*a*b**3*f*sqrt(-a/b) - 6*b**4*f*sqrt(-a/b)) - 6*b**3*f*x*sqrt(-a/b)/(6*a*b
**3*f*sqrt(-a/b) - 6*b**4*f*sqrt(-a/b)) - 2*b**3*sqrt(-a/b)*tan(e + f*x)**3/(6*a*b**3*f*sqrt(-a/b) - 6*b**4*f*
sqrt(-a/b)) + 6*b**3*sqrt(-a/b)*tan(e + f*x)/(6*a*b**3*f*sqrt(-a/b) - 6*b**4*f*sqrt(-a/b)), True))

________________________________________________________________________________________

Giac [A]
time = 2.12, size = 118, normalized size = 1.39 \begin {gather*} \frac {\frac {3 \, {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b}}\right )\right )} a^{3}}{{\left (a b^{2} - b^{3}\right )} \sqrt {a b}} - \frac {3 \, {\left (f x + e\right )}}{a - b} + \frac {b^{2} \tan \left (f x + e\right )^{3} - 3 \, a b \tan \left (f x + e\right ) - 3 \, b^{2} \tan \left (f x + e\right )}{b^{3}}}{3 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(tan(f*x+e)^6/(a+b*tan(f*x+e)^2),x, algorithm="giac")

[Out]

1/3*(3*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b)))*a^3/((a*b^2 - b^3)*sqrt(a*b))
- 3*(f*x + e)/(a - b) + (b^2*tan(f*x + e)^3 - 3*a*b*tan(f*x + e) - 3*b^2*tan(f*x + e))/b^3)/f

________________________________________________________________________________________

Mupad [B]
time = 12.00, size = 1310, normalized size = 15.41 \begin {gather*} \frac {{\mathrm {tan}\left (e+f\,x\right )}^3}{3\,b\,f}+\frac {2\,\mathrm {atan}\left (\frac {\frac {\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^6+b^6\right )}{b^3}+\frac {\left (\frac {4\,a^4\,b^3-4\,a^3\,b^4-4\,a^2\,b^5+4\,a\,b^6}{b^3}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (-4\,a^3\,b^5+4\,a^2\,b^6+4\,a\,b^7-4\,b^8\right )\,2{}\mathrm {i}}{b^3\,\left (2\,a-2\,b\right )}\right )\,1{}\mathrm {i}}{2\,a-2\,b}}{2\,a-2\,b}-\frac {-\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^6+b^6\right )}{b^3}+\frac {\left (\frac {4\,a^4\,b^3-4\,a^3\,b^4-4\,a^2\,b^5+4\,a\,b^6}{b^3}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (-4\,a^3\,b^5+4\,a^2\,b^6+4\,a\,b^7-4\,b^8\right )\,2{}\mathrm {i}}{b^3\,\left (2\,a-2\,b\right )}\right )\,1{}\mathrm {i}}{2\,a-2\,b}}{2\,a-2\,b}}{-\frac {2\,\left (a^5+a^4\,b+a^3\,b^2\right )}{b^3}+\frac {\left (\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^6+b^6\right )}{b^3}+\frac {\left (\frac {4\,a^4\,b^3-4\,a^3\,b^4-4\,a^2\,b^5+4\,a\,b^6}{b^3}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (-4\,a^3\,b^5+4\,a^2\,b^6+4\,a\,b^7-4\,b^8\right )\,2{}\mathrm {i}}{b^3\,\left (2\,a-2\,b\right )}\right )\,1{}\mathrm {i}}{2\,a-2\,b}\right )\,1{}\mathrm {i}}{2\,a-2\,b}+\frac {\left (-\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^6+b^6\right )}{b^3}+\frac {\left (\frac {4\,a^4\,b^3-4\,a^3\,b^4-4\,a^2\,b^5+4\,a\,b^6}{b^3}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (-4\,a^3\,b^5+4\,a^2\,b^6+4\,a\,b^7-4\,b^8\right )\,2{}\mathrm {i}}{b^3\,\left (2\,a-2\,b\right )}\right )\,1{}\mathrm {i}}{2\,a-2\,b}\right )\,1{}\mathrm {i}}{2\,a-2\,b}}\right )}{f\,\left (2\,a-2\,b\right )}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (a+b\right )}{b^2\,f}-\frac {\mathrm {atan}\left (\frac {\frac {\left (\frac {\left (\frac {4\,a^4\,b^3-4\,a^3\,b^4-4\,a^2\,b^5+4\,a\,b^6}{b^3}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^5\,b^5}\,\left (-4\,a^3\,b^5+4\,a^2\,b^6+4\,a\,b^7-4\,b^8\right )}{b^3\,\left (a\,b^5-b^6\right )}\right )\,\sqrt {-a^5\,b^5}}{2\,\left (a\,b^5-b^6\right )}-\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^6+b^6\right )}{b^3}\right )\,\sqrt {-a^5\,b^5}\,1{}\mathrm {i}}{2\,\left (a\,b^5-b^6\right )}-\frac {\left (\frac {\left (\frac {4\,a^4\,b^3-4\,a^3\,b^4-4\,a^2\,b^5+4\,a\,b^6}{b^3}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^5\,b^5}\,\left (-4\,a^3\,b^5+4\,a^2\,b^6+4\,a\,b^7-4\,b^8\right )}{b^3\,\left (a\,b^5-b^6\right )}\right )\,\sqrt {-a^5\,b^5}}{2\,\left (a\,b^5-b^6\right )}+\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^6+b^6\right )}{b^3}\right )\,\sqrt {-a^5\,b^5}\,1{}\mathrm {i}}{2\,\left (a\,b^5-b^6\right )}}{\frac {\left (\frac {\left (\frac {4\,a^4\,b^3-4\,a^3\,b^4-4\,a^2\,b^5+4\,a\,b^6}{b^3}+\frac {\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^5\,b^5}\,\left (-4\,a^3\,b^5+4\,a^2\,b^6+4\,a\,b^7-4\,b^8\right )}{b^3\,\left (a\,b^5-b^6\right )}\right )\,\sqrt {-a^5\,b^5}}{2\,\left (a\,b^5-b^6\right )}-\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^6+b^6\right )}{b^3}\right )\,\sqrt {-a^5\,b^5}}{2\,\left (a\,b^5-b^6\right )}-\frac {2\,\left (a^5+a^4\,b+a^3\,b^2\right )}{b^3}+\frac {\left (\frac {\left (\frac {4\,a^4\,b^3-4\,a^3\,b^4-4\,a^2\,b^5+4\,a\,b^6}{b^3}-\frac {\mathrm {tan}\left (e+f\,x\right )\,\sqrt {-a^5\,b^5}\,\left (-4\,a^3\,b^5+4\,a^2\,b^6+4\,a\,b^7-4\,b^8\right )}{b^3\,\left (a\,b^5-b^6\right )}\right )\,\sqrt {-a^5\,b^5}}{2\,\left (a\,b^5-b^6\right )}+\frac {2\,\mathrm {tan}\left (e+f\,x\right )\,\left (a^6+b^6\right )}{b^3}\right )\,\sqrt {-a^5\,b^5}}{2\,\left (a\,b^5-b^6\right )}}\right )\,\sqrt {-a^5\,b^5}\,1{}\mathrm {i}}{f\,\left (a\,b^5-b^6\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(e + f*x)^6/(a + b*tan(e + f*x)^2),x)

[Out]

tan(e + f*x)^3/(3*b*f) + (2*atan((((((4*a*b^6 - 4*a^2*b^5 - 4*a^3*b^4 + 4*a^4*b^3)/b^3 - (tan(e + f*x)*(4*a*b^
7 - 4*b^8 + 4*a^2*b^6 - 4*a^3*b^5)*2i)/(b^3*(2*a - 2*b)))*1i)/(2*a - 2*b) + (2*tan(e + f*x)*(a^6 + b^6))/b^3)/
(2*a - 2*b) - ((((4*a*b^6 - 4*a^2*b^5 - 4*a^3*b^4 + 4*a^4*b^3)/b^3 + (tan(e + f*x)*(4*a*b^7 - 4*b^8 + 4*a^2*b^
6 - 4*a^3*b^5)*2i)/(b^3*(2*a - 2*b)))*1i)/(2*a - 2*b) - (2*tan(e + f*x)*(a^6 + b^6))/b^3)/(2*a - 2*b))/((((((4
*a*b^6 - 4*a^2*b^5 - 4*a^3*b^4 + 4*a^4*b^3)/b^3 - (tan(e + f*x)*(4*a*b^7 - 4*b^8 + 4*a^2*b^6 - 4*a^3*b^5)*2i)/
(b^3*(2*a - 2*b)))*1i)/(2*a - 2*b) + (2*tan(e + f*x)*(a^6 + b^6))/b^3)*1i)/(2*a - 2*b) - (2*(a^4*b + a^5 + a^3
*b^2))/b^3 + (((((4*a*b^6 - 4*a^2*b^5 - 4*a^3*b^4 + 4*a^4*b^3)/b^3 + (tan(e + f*x)*(4*a*b^7 - 4*b^8 + 4*a^2*b^
6 - 4*a^3*b^5)*2i)/(b^3*(2*a - 2*b)))*1i)/(2*a - 2*b) - (2*tan(e + f*x)*(a^6 + b^6))/b^3)*1i)/(2*a - 2*b))))/(
f*(2*a - 2*b)) - (tan(e + f*x)*(a + b))/(b^2*f) - (atan(((((((4*a*b^6 - 4*a^2*b^5 - 4*a^3*b^4 + 4*a^4*b^3)/b^3
 + (tan(e + f*x)*(-a^5*b^5)^(1/2)*(4*a*b^7 - 4*b^8 + 4*a^2*b^6 - 4*a^3*b^5))/(b^3*(a*b^5 - b^6)))*(-a^5*b^5)^(
1/2))/(2*(a*b^5 - b^6)) - (2*tan(e + f*x)*(a^6 + b^6))/b^3)*(-a^5*b^5)^(1/2)*1i)/(2*(a*b^5 - b^6)) - (((((4*a*
b^6 - 4*a^2*b^5 - 4*a^3*b^4 + 4*a^4*b^3)/b^3 - (tan(e + f*x)*(-a^5*b^5)^(1/2)*(4*a*b^7 - 4*b^8 + 4*a^2*b^6 - 4
*a^3*b^5))/(b^3*(a*b^5 - b^6)))*(-a^5*b^5)^(1/2))/(2*(a*b^5 - b^6)) + (2*tan(e + f*x)*(a^6 + b^6))/b^3)*(-a^5*
b^5)^(1/2)*1i)/(2*(a*b^5 - b^6)))/((((((4*a*b^6 - 4*a^2*b^5 - 4*a^3*b^4 + 4*a^4*b^3)/b^3 + (tan(e + f*x)*(-a^5
*b^5)^(1/2)*(4*a*b^7 - 4*b^8 + 4*a^2*b^6 - 4*a^3*b^5))/(b^3*(a*b^5 - b^6)))*(-a^5*b^5)^(1/2))/(2*(a*b^5 - b^6)
) - (2*tan(e + f*x)*(a^6 + b^6))/b^3)*(-a^5*b^5)^(1/2))/(2*(a*b^5 - b^6)) - (2*(a^4*b + a^5 + a^3*b^2))/b^3 +
(((((4*a*b^6 - 4*a^2*b^5 - 4*a^3*b^4 + 4*a^4*b^3)/b^3 - (tan(e + f*x)*(-a^5*b^5)^(1/2)*(4*a*b^7 - 4*b^8 + 4*a^
2*b^6 - 4*a^3*b^5))/(b^3*(a*b^5 - b^6)))*(-a^5*b^5)^(1/2))/(2*(a*b^5 - b^6)) + (2*tan(e + f*x)*(a^6 + b^6))/b^
3)*(-a^5*b^5)^(1/2))/(2*(a*b^5 - b^6))))*(-a^5*b^5)^(1/2)*1i)/(f*(a*b^5 - b^6))

________________________________________________________________________________________